import 'package:flutter/material.dart';
import 'package:flutter_base/api/dio_util.dart';
import 'package:flutter_base/page/launch_page.dart';
import 'package:flutter_base/util/utils.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'componet/alert.dart';

SharedPreferences? sp;
void main() async {
  ///binding初始化 啥意思？？
  WidgetsFlutterBinding.ensureInitialized();
  ///初始化本地储存，没有上面的初始化，这里初始化share会报错
  sp = await SharedPreferences.getInstance();
  setStatusBarLight(true);
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: globalNavigatorKey,
      //不显示debug标签
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.yellow,
      ),
      home: LaunchPage(),
    );
  }
}


